<?php
/**
 * Description of logController
 *
 * @author Henson
 */
class logController {
    
   public function supervisorAction()
   {
	   $log = new Log();
	   if(_checkSuperLogin() && $log->checkPermission())
	   {
			$totalNum = $log->getLogTotal();
			$p = isset($_GET['p']) ? intval($_GET['p']) : 1;
			$pageUrl = '/index.php?r=log/supervisor';
			$page = new Page($p, $pageUrl, $totalNum, $log->pageRow);
			$page->run();
			$where = "where del='0'";
			$orderBy = 'order by id desc';
			$limit = " limit ".($p -1 ) * $log->pageRow .",".$log->pageRow;
			$rows = $log->getLogList($where, $orderBy, $limit);
			foreach($rows as $key=>$value)
			{
				$rows[$key] = $log->dealLog($value);
			}
			$pageInfo['rows'] = $rows;
			$pageInfo['page'] = $page;
			$view = new view(); 
			$view->showPage('management/logList.tpl.htm', $pageInfo);
	   }
   }
}

?>
